package com.zy.cat.entity.dev.act;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

import com.zy.cat.entity.dev.CatDevHCInviteIncomeHistory;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Description: 抽奖活动记录表
 * @author xiake
 * @date 2020-08-27 02:37:33
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Table(name = "zy_cat_daily_draw_history")
public class CatDailyDrawHistory implements Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = -4588185764313430983L;

	/**
     * 本轮抽奖ID
     */
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Id
    private Long id;

    /**
     * 奖品ID
     */
    @Column(name = "prize_id")
    private Integer prizeId;

    /**
     * 开奖期数轮次
     */
    private Integer round;

    /**
     * 目前抽奖人数
     */
    @Column(name = "draw_num")
    private Integer drawNum;

    /**
     * 抽奖总人数
     */
    @Column(name = "draw_total")
    private Integer drawTotal;

    /**
     * 抽奖状态(-1.本轮异常、0.未开奖、1.已开奖)
     */
    @Column(name = "draw_status")
    private Integer drawStatus;

    /**
     * 中奖用户pid
     */
    private String pid;

    /**
     * 开奖时间
     */
    @Column(name = "draw_time")
    private Date drawTime;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

	public CatDailyDrawHistory(Integer prizeId, Integer round, Integer drawTotal, Integer drawStatus, Date createTime) {
		super();
		this.prizeId = prizeId;
		this.round = round;
		this.drawTotal = drawTotal;
		this.drawStatus = drawStatus;
		this.createTime = createTime;
		this.drawTotal=0;
	}
}